Change the qemu to allow no network arguments, removing the
authorchris@kneesaa.uk.xensource.com <chris@kneesaa.uk.xensource.com>
Fri, 14 Jul 2006 14:59:24 +0000 (15:59 +0100)
committerchris@kneesaa.uk.xensource.com <chris@kneesaa.uk.xensource.com>
Fri, 14 Jul 2006 14:59:24 +0000 (15:59 +0100)
"-net nic -net user" default.

Based on a patch from: Daniel Stekloff <dsteklof@us.ibm.com>
Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
tools/ioemu/patches/domain-timeoffset
tools/ioemu/patches/qemu-dm
tools/ioemu/patches/qemu-logging
tools/ioemu/patches/vnc-fixes
tools/ioemu/patches/xen-mm
tools/ioemu/vl.c

index 52abd88d0186533592815c088b995319990ab158..f7915df568adcb5e1faa00f97f34ecda4fac65b4 100644 (file)
@@ -1,7 +1,7 @@
 Index: ioemu/hw/mc146818rtc.c
 ===================================================================
---- ioemu.orig/hw/mc146818rtc.c        2006-07-12 11:33:54.096180895 +0100
-+++ ioemu/hw/mc146818rtc.c     2006-07-12 11:35:03.205515168 +0100
+--- ioemu.orig/hw/mc146818rtc.c        2006-07-14 15:55:55.450963213 +0100
++++ ioemu/hw/mc146818rtc.c     2006-07-14 15:56:02.195195680 +0100
 @@ -178,10 +178,27 @@
      }
  }
@@ -46,8 +46,8 @@ Index: ioemu/hw/mc146818rtc.c
  static void rtc_copy_date(RTCState *s)
 Index: ioemu/hw/pc.c
 ===================================================================
---- ioemu.orig/hw/pc.c 2006-07-12 11:35:02.876556380 +0100
-+++ ioemu/hw/pc.c      2006-07-12 11:35:03.205515168 +0100
+--- ioemu.orig/hw/pc.c 2006-07-14 15:56:01.774243586 +0100
++++ ioemu/hw/pc.c      2006-07-14 15:56:02.196195566 +0100
 @@ -151,7 +151,7 @@
  }
  
@@ -117,8 +117,8 @@ Index: ioemu/hw/pc.c
  QEMUMachine pc_machine = {
 Index: ioemu/vl.c
 ===================================================================
---- ioemu.orig/vl.c    2006-07-12 11:35:03.004540346 +0100
-+++ ioemu/vl.c 2006-07-12 11:35:03.208514792 +0100
+--- ioemu.orig/vl.c    2006-07-14 15:56:02.010216731 +0100
++++ ioemu/vl.c 2006-07-14 15:56:02.198195338 +0100
 @@ -164,6 +164,8 @@
  
  int xc_handle;
@@ -162,7 +162,7 @@ Index: ioemu/vl.c
              }
          }
      }
-@@ -5961,7 +5969,8 @@
+@@ -5963,7 +5971,8 @@
  
      machine->init(ram_size, vga_ram_size, boot_device,
                    ds, fd_filename, snapshot,
@@ -174,8 +174,8 @@ Index: ioemu/vl.c
      qemu_mod_timer(gui_timer, qemu_get_clock(rt_clock));
 Index: ioemu/vl.h
 ===================================================================
---- ioemu.orig/vl.h    2006-07-12 11:35:02.881555754 +0100
-+++ ioemu/vl.h 2006-07-12 11:35:03.209514667 +0100
+--- ioemu.orig/vl.h    2006-07-14 15:56:01.779243017 +0100
++++ ioemu/vl.h 2006-07-14 15:56:02.199195224 +0100
 @@ -556,7 +556,7 @@
                                   int boot_device,
               DisplayState *ds, const char **fd_filename, int snapshot,
index b681eedeac7ac3e0b8b7159bb2d52d433a63b040..5fa3eafc084e991c5fe6f444c310d7ba3c3a5a46 100644 (file)
@@ -1,7 +1,7 @@
 Index: ioemu/Makefile.target
 ===================================================================
---- ioemu.orig/Makefile.target 2006-07-12 11:35:00.382868802 +0100
-+++ ioemu/Makefile.target      2006-07-12 11:35:00.452860033 +0100
+--- ioemu.orig/Makefile.target 2006-07-14 15:50:41.320748096 +0100
++++ ioemu/Makefile.target      2006-07-14 15:55:04.753733845 +0100
 @@ -285,7 +285,7 @@
  endif
  
@@ -13,8 +13,8 @@ Index: ioemu/Makefile.target
  VL_OBJS+=tap-win32.o
 Index: ioemu/configure
 ===================================================================
---- ioemu.orig/configure       2006-07-12 11:35:00.383868677 +0100
-+++ ioemu/configure    2006-07-12 11:35:00.453859908 +0100
+--- ioemu.orig/configure       2006-07-14 15:50:41.320748096 +0100
++++ ioemu/configure    2006-07-14 15:55:04.753733845 +0100
 @@ -75,8 +75,8 @@
  bigendian="no"
  mingw32="no"
@@ -37,8 +37,8 @@ Index: ioemu/configure
    target_user_only="yes"
 Index: ioemu/cpu-all.h
 ===================================================================
---- ioemu.orig/cpu-all.h       2006-07-12 11:33:54.968071470 +0100
-+++ ioemu/cpu-all.h    2006-07-12 11:35:00.453859908 +0100
+--- ioemu.orig/cpu-all.h       2006-07-14 15:50:30.488983278 +0100
++++ ioemu/cpu-all.h    2006-07-14 15:55:04.544757636 +0100
 @@ -690,7 +690,9 @@
  void page_set_flags(target_ulong start, target_ulong end, int flags);
  void page_unprotect_range(target_ulong data, target_ulong data_size);
@@ -64,8 +64,8 @@ Index: ioemu/cpu-all.h
  void cpu_dump_state(CPUState *env, FILE *f, 
 Index: ioemu/disas.h
 ===================================================================
---- ioemu.orig/disas.h 2006-07-12 11:33:54.968071470 +0100
-+++ ioemu/disas.h      2006-07-12 11:35:00.453859908 +0100
+--- ioemu.orig/disas.h 2006-07-14 15:50:30.489983164 +0100
++++ ioemu/disas.h      2006-07-14 15:50:41.334746500 +0100
 @@ -1,6 +1,7 @@
  #ifndef _QEMU_DISAS_H
  #define _QEMU_DISAS_H
@@ -83,8 +83,8 @@ Index: ioemu/disas.h
  #endif /* _QEMU_DISAS_H */
 Index: ioemu/exec-all.h
 ===================================================================
---- ioemu.orig/exec-all.h      2006-07-12 11:33:54.968071470 +0100
-+++ ioemu/exec-all.h   2006-07-12 11:35:00.454859782 +0100
+--- ioemu.orig/exec-all.h      2006-07-14 15:50:30.490983050 +0100
++++ ioemu/exec-all.h   2006-07-14 15:50:41.335746386 +0100
 @@ -509,7 +509,7 @@
  
  extern int tb_invalidated_flag;
@@ -105,8 +105,8 @@ Index: ioemu/exec-all.h
      return addr;
 Index: ioemu/hw/pc.c
 ===================================================================
---- ioemu.orig/hw/pc.c 2006-07-12 11:33:54.967071596 +0100
-+++ ioemu/hw/pc.c      2006-07-12 11:35:00.455859657 +0100
+--- ioemu.orig/hw/pc.c 2006-07-14 15:50:30.491982936 +0100
++++ ioemu/hw/pc.c      2006-07-14 15:55:04.543757750 +0100
 @@ -65,6 +65,7 @@
      return qemu_get_clock(vm_clock);
  }
@@ -184,8 +184,8 @@ Index: ioemu/hw/pc.c
          if (serial_hds[i]) {
 Index: ioemu/hw/vga_int.h
 ===================================================================
---- ioemu.orig/hw/vga_int.h    2006-07-12 11:33:54.967071596 +0100
-+++ ioemu/hw/vga_int.h 2006-07-12 11:35:00.455859657 +0100
+--- ioemu.orig/hw/vga_int.h    2006-07-14 15:50:30.491982936 +0100
++++ ioemu/hw/vga_int.h 2006-07-14 15:55:02.931941245 +0100
 @@ -28,7 +28,7 @@
  #define ST01_DISP_ENABLE    0x01
  
@@ -197,8 +197,8 @@ Index: ioemu/hw/vga_int.h
  #define VBE_DISPI_MAX_YRES              768
 Index: ioemu/monitor.c
 ===================================================================
---- ioemu.orig/monitor.c       2006-07-12 11:33:54.968071470 +0100
-+++ ioemu/monitor.c    2006-07-12 11:35:00.456859532 +0100
+--- ioemu.orig/monitor.c       2006-07-14 15:50:30.493982708 +0100
++++ ioemu/monitor.c    2006-07-14 15:55:04.754733732 +0100
 @@ -68,6 +68,12 @@
  
  void term_flush(void)
@@ -429,8 +429,8 @@ Index: ioemu/monitor.c
  {
 Index: ioemu/vl.c
 ===================================================================
---- ioemu.orig/vl.c    2006-07-12 11:33:54.967071596 +0100
-+++ ioemu/vl.c 2006-07-12 11:35:00.459859156 +0100
+--- ioemu.orig/vl.c    2006-07-14 15:50:30.496982366 +0100
++++ ioemu/vl.c 2006-07-14 15:55:07.676401124 +0100
 @@ -423,12 +423,15 @@
  void hw_error(const char *fmt, ...)
  {
@@ -489,3 +489,19 @@ Index: ioemu/vl.c
  
  /***********************************************************/
  /* machine registration */
+@@ -5481,6 +5505,7 @@
+     socket_init();
+ #endif
++#ifndef CONFIG_DM
+     /* init network clients */
+     if (nb_net_clients == 0) {
+         /* if no clients, we use a default config */
+@@ -5490,6 +5515,7 @@
+                 "user");
+         nb_net_clients = 2;
+     }
++#endif /* !CONFIG_DM */
+     for(i = 0;i < nb_net_clients; i++) {
+         if (net_client_init(net_clients[i]) < 0)
index c11dbb6ae32d11a6dd97f0e226cca8c2a577cb41..2dca92beca93e7ffef595f0a0b458f536688ab06 100644 (file)
@@ -1,7 +1,7 @@
 Index: ioemu/vl.c
 ===================================================================
---- ioemu.orig/vl.c    2006-07-12 11:35:00.955797021 +0100
-+++ ioemu/vl.c 2006-07-12 11:35:01.094779608 +0100
+--- ioemu.orig/vl.c    2006-07-14 15:55:59.491503372 +0100
++++ ioemu/vl.c 2006-07-14 15:55:59.693480386 +0100
 @@ -4697,7 +4697,7 @@
             "-S              freeze CPU at startup (use 'c' to start execution)\n"
             "-s              wait gdb connection to port %d\n"
@@ -59,7 +59,7 @@ Index: ioemu/vl.c
                  {
                      int mask;
                      CPULogItem *item;
-@@ -5698,7 +5705,7 @@
+@@ -5700,7 +5707,7 @@
          stk.ss_flags = 0;
  
          if (sigaltstack(&stk, NULL) < 0) {
index 381d3e72f34ff8ab1236cb38fdd0a77e60b5c480..a26ffce2630a6d877084a787ea37c968b5ac3bab 100644 (file)
@@ -1,8 +1,8 @@
 Index: ioemu/vl.c
 ===================================================================
---- ioemu.orig/vl.c    2006-07-13 10:09:33.965343475 +0100
-+++ ioemu/vl.c 2006-07-13 10:10:11.141134364 +0100
-@@ -5972,8 +5972,10 @@
+--- ioemu.orig/vl.c    2006-07-14 15:56:03.043099185 +0100
++++ ioemu/vl.c 2006-07-14 15:56:03.123090082 +0100
+@@ -5974,8 +5974,10 @@
                    kernel_filename, kernel_cmdline, initrd_filename,
                    timeoffset);
  
@@ -17,8 +17,8 @@ Index: ioemu/vl.c
      if (use_gdbstub) {
 Index: ioemu/vnc.c
 ===================================================================
---- ioemu.orig/vnc.c   2006-07-13 10:09:33.963343701 +0100
-+++ ioemu/vnc.c        2006-07-13 10:09:34.025336681 +0100
+--- ioemu.orig/vnc.c   2006-07-14 15:56:03.040099527 +0100
++++ ioemu/vnc.c        2006-07-14 15:56:03.124089968 +0100
 @@ -3,6 +3,7 @@
   * 
   * Copyright (C) 2006 Anthony Liguori <anthony@codemonkey.ws>
index feb537ed56b611adff81b410a432078e89c5fb0c..f19c058f5409165b77cb89fc7b407c4df5af1e39 100644 (file)
@@ -1,7 +1,8 @@
-diff -r f36cde91babe hw/pc.c
---- a/hw/pc.c  Mon Jun 26 15:16:50 2006 +0100
-+++ b/hw/pc.c  Mon Jun 26 15:18:19 2006 +0100
-@@ -639,7 +639,9 @@ static void pc_init1(uint64_t ram_size, 
+Index: ioemu/hw/pc.c
+===================================================================
+--- ioemu.orig/hw/pc.c 2006-07-14 15:55:59.489503600 +0100
++++ ioemu/hw/pc.c      2006-07-14 15:56:00.354405169 +0100
+@@ -639,7 +639,9 @@
      }
  
      /* allocate RAM */
@@ -11,7 +12,7 @@ diff -r f36cde91babe hw/pc.c
  
      /* BIOS load */
      bios_offset = ram_size + vga_ram_size;
-@@ -671,8 +673,10 @@ static void pc_init1(uint64_t ram_size, 
+@@ -671,8 +673,10 @@
      ret = load_image(buf, phys_ram_base + vga_bios_offset);
      
      /* setup basic memory access */
@@ -22,19 +23,20 @@ diff -r f36cde91babe hw/pc.c
  
      /* map the last 128KB of the BIOS in ISA space */
      isa_bios_size = bios_size;
-diff -r f36cde91babe vl.c
---- a/vl.c     Mon Jun 26 15:16:50 2006 +0100
-+++ b/vl.c     Mon Jun 26 15:18:19 2006 +0100
-@@ -158,6 +158,8 @@ int vnc_display = -1;
- #else
+Index: ioemu/vl.c
+===================================================================
+--- ioemu.orig/vl.c    2006-07-14 15:56:00.271414614 +0100
++++ ioemu/vl.c 2006-07-14 15:56:00.358404714 +0100
+@@ -159,6 +159,8 @@
  #define MAX_CPUS 1
  #endif
-+
-+int xc_handle;
  
++int xc_handle;
++
  char domain_name[1024] = { 'H','V', 'M', 'X', 'E', 'N', '-'};
  extern int domid;
-@@ -5105,6 +5107,9 @@ int main(int argc, char **argv)
+@@ -5105,6 +5107,9 @@
      QEMUMachine *machine;
      char usb_devices[MAX_VM_USB_PORTS][128];
      int usb_devices_index;
@@ -44,7 +46,7 @@ diff -r f36cde91babe vl.c
  
      char qemu_dm_logfilename[64];
  
-@@ -5341,11 +5346,13 @@ int main(int argc, char **argv)
+@@ -5341,11 +5346,13 @@
                  ram_size = atol(optarg) * 1024 * 1024;
                  if (ram_size <= 0)
                      help();
@@ -58,7 +60,7 @@ diff -r f36cde91babe vl.c
                  break;
              case QEMU_OPTION_l:
                  {
-@@ -5557,6 +5564,39 @@ int main(int argc, char **argv)
+@@ -5559,6 +5566,39 @@
      /* init the memory */
      phys_ram_size = ram_size + vga_ram_size + bios_size;
  
@@ -98,12 +100,12 @@ diff -r f36cde91babe vl.c
  #ifdef CONFIG_SOFTMMU
      phys_ram_base = qemu_vmalloc(phys_ram_size);
      if (!phys_ram_base) {
-@@ -5596,6 +5636,8 @@ int main(int argc, char **argv)
-         }
+@@ -5599,6 +5639,8 @@
      }
  #endif
-+
-+#endif /* !CONFIG_DM */
  
++#endif /* !CONFIG_DM */
++
      /* we always create the cdrom drive, even if no disk is there */
      bdrv_init();
+     if (cdrom_index >= 0) {
index 3b8c8ccaa5d220bf9e35df52be1a7d00d5d0ec13..3eafd801ee2b88e0a897b81c1e3aed91171ce1a9 100644 (file)
@@ -5715,6 +5715,7 @@ int main(int argc, char **argv)
     socket_init();
 #endif
 
+#ifndef CONFIG_DM
     /* init network clients */
     if (nb_net_clients == 0) {
         /* if no clients, we use a default config */
@@ -5724,6 +5725,7 @@ int main(int argc, char **argv)
                 "user");
         nb_net_clients = 2;
     }
+#endif /* !CONFIG_DM */
 
     for(i = 0;i < nb_net_clients; i++) {
         if (net_client_init(net_clients[i]) < 0)